﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp6
{
    class Program
    {
        static void Main(string[] args)
        {
            SortedList sortedList = new SortedList();
            sortedList.Add(1, "Letme");
            sortedList.Add(2, "Mlxg");
            sortedList.Add(3, "XiaoHu");
            sortedList.Add(4, "Zz1tai");
            sortedList.Add(5, "Ming");
            sortedList.Add(6, "UZI");
            Console.WriteLine("请输入人物编号 1~6");
            int id = int.Parse(Console.ReadLine());
            bool flag = sortedList.ContainsKey(id);
            if (flag)
            {
                string name = sortedList[id].ToString();
                Console.WriteLine("你要找的是RNG的{0}", name);
            }
            else
            {
                Console.WriteLine("没有这个信息");
            }
            Console.WriteLine("RNG队员如下");
            foreach (DictionaryEntry item in sortedList)
            {
                int id2 = (int)item.Key;
                string value = item.Value.ToString();
                Console.WriteLine("编号{0}，名字{1}", id2, value);
            }
            Console.ReadKey();
        }
    }
}